package GUILag;

import java.awt.BorderLayout;
import java.awt.EventQueue;

import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import javax.swing.JTextArea;
import javax.swing.JTree;
import javax.swing.tree.DefaultTreeModel;
import javax.swing.tree.DefaultMutableTreeNode;
import javax.swing.JTextField;
import java.awt.Font;
import javax.swing.JButton;
import java.awt.Color;

public class BetalingGUI extends JFrame {

	private JPanel contentPane;
	private JTextField txtBetaltKontant;
	private JTextField txtBetaltMedDankort;

	/**
	 * Launch the application.
	 */
	public static void main(String[] args) {
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				try {
					BetalingGUI frame = new BetalingGUI();
					frame.setVisible(true);
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		});
	}

	/**
	 * Create the frame.
	 */
	public BetalingGUI() {
		setTitle("Betaling");
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		setBounds(100, 100, 655, 420);
		contentPane = new JPanel();
		contentPane.setBackground(Color.LIGHT_GRAY);
		contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
		setContentPane(contentPane);
		contentPane.setLayout(null);
		
		JTextArea textArea = new JTextArea();
		textArea.setText("Ordre ID: ");
		textArea.setBounds(394, 21, 136, 22);
		contentPane.add(textArea);
		
		JTextArea textArea_1 = new JTextArea();
		textArea_1.setText("Dato: ");
		textArea_1.setBounds(540, 21, 89, 22);
		contentPane.add(textArea_1);
		
		JTree tree = new JTree();
		tree.setModel(new DefaultTreeModel(
			new DefaultMutableTreeNode("Vestbjerg byggecenter A/S") {
				{
					add(new DefaultMutableTreeNode("Kassesalg"));
					add(new DefaultMutableTreeNode("Ordre"));
					add(new DefaultMutableTreeNode("Opret nyt medlem"));
					add(new DefaultMutableTreeNode("S\u00F8g efter medlem"));
				}
			}
		));
		tree.setBounds(0, 0, 153, 383);
		contentPane.add(tree);
		
		txtBetaltKontant = new JTextField();
		txtBetaltKontant.setText("Betalt kontant = ");
		txtBetaltKontant.setBounds(197, 91, 401, 20);
		contentPane.add(txtBetaltKontant);
		txtBetaltKontant.setColumns(10);
		
		txtBetaltMedDankort = new JTextField();
		txtBetaltMedDankort.setText("Betalt med Dankort = ");
		txtBetaltMedDankort.setColumns(10);
		txtBetaltMedDankort.setBounds(197, 122, 401, 20);
		contentPane.add(txtBetaltMedDankort);
		
		JTextArea txtrByttepenge = new JTextArea();
		txtrByttepenge.setFont(new Font("Tahoma", Font.PLAIN, 11));
		txtrByttepenge.setText("Byttepenge = ");
		txtrByttepenge.setBounds(197, 270, 401, 20);
		contentPane.add(txtrByttepenge);
		
		JTextArea txtrTotalMedRabat = new JTextArea();
		txtrTotalMedRabat.setText("Total med rabat = ");
		txtrTotalMedRabat.setFont(new Font("Tahoma", Font.PLAIN, 11));
		txtrTotalMedRabat.setBounds(197, 211, 401, 20);
		contentPane.add(txtrTotalMedRabat);
		
		JTextArea txtrTotal = new JTextArea();
		txtrTotal.setText("Total = ");
		txtrTotal.setFont(new Font("Tahoma", Font.PLAIN, 11));
		txtrTotal.setBounds(197, 180, 401, 20);
		contentPane.add(txtrTotal);
		
		JButton button = new JButton("Tilbage");
		button.setBounds(163, 348, 89, 23);
		contentPane.add(button);
		
		JButton btnAfslut = new JButton("Afslut");
		btnAfslut.setBounds(540, 348, 89, 23);
		contentPane.add(btnAfslut);
	}

}
